package com.nfu_company.orderup.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nfu_company.orderup.common.CustomException;
import com.nfu_company.orderup.entity.Employee;
import com.nfu_company.orderup.mapper.EmployeeMapper;
import com.nfu_company.orderup.service.EmployeeService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class EmployeeServiceImpl extends ServiceImpl<EmployeeMapper, Employee> implements EmployeeService {
    @Override
    @Transactional
    public void deleteById(Long id) {
        try {
            this.removeById(id);
        } catch (Exception e) {
            throw new CustomException("删除失败");
        }
    }
}
